<template>
  <!-- 到货确认 -->
  <div>
    <FormPanel :list="formList" labelWidth="130" :isSubmitBtn="false"></FormPanel>
    <div class="btnWrap">
      <el-button @click="handleCancle">取消</el-button>
      <el-button type="primary">确认</el-button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      formList: this.createFormList()
    };
  },
  methods: {
    createFormList() {
      return [
        {
          type: 'INPUT',
          label: '发货单号',
          fieldName: 'a1',
          rules: [{ required: true, message: '发货单号不能为空', trigger: 'blur' }]
        },
        {
          type: 'DATE_TIME',
          label: '到户确认日期',
          fieldName: 'a2',
          initialValue: new Date(),
          rules: [{ required: true, message: '确认日期不能为空', trigger: 'blur' }]
        }
      ];
    },
    handleCancle() {
      this.$emit('close');
    }
  }
};
</script>

<style scoped>
.btnWrap {
  position: absolute;
  left: 0px;
  bottom: 0px;
  right: 0px;
  z-index: 9;
  border-top: 1px solid rgb(233, 233, 233);
  padding: 10px 20px;
  background: rgb(255, 255, 255);
  text-align: right;
}
</style>
